{include file="common/top"}
<div id="page-wrapper">
    <div id="page-inner">
        <div class="row">
            <div class="col-md-12">
                <h1 class="page-head-line">订单列表</h1>
                <h1 class="page-subhead-line"></h1>

            </div>
        </div>
        <!-- /. ROW  -->

        <div class="row">
            <div class="col-md-6" style="width: 100%">
                <!--   Kitchen Sink -->
                <div class="panel panel-default">
                    <div class="panel-heading">
                        订单管理
                    </div>
                    <div class="panel-body">
                        <div class="panel-heading">
                            <form action="/admin/order/index" method="post">
                                <input type="datetime-local" value="{$sou.open_time}" name="open_time"><span>开仓时间</span>
                                <select name="merchant_id"><option value="">选择代理商</option>{volist name="admin" id = "ad"}<option value="{$ad.id}" {if $sou.merchant_id==$ad.id}selected{/if}>{$ad.username}</option>{/volist}</select>
                                <input type="text" placeholder="请输入要查询的用户名" value="{$sou.nickname}" name="nickname">
                                <select name="close_type"><option value="">请选择平仓类型</option><option value="自动平仓"  {if $sou.close_type=="自动平仓"}selected{/if}>自动平仓</option>
                                    <option value="手动平仓" {if $sou.close_type=="手动平仓"}selected{/if}>手动平仓</option>
                                    <option value="强制平仓" {if $sou.close_type=="强制平仓"}selected{/if}>强制平仓</option></select>
                                <input type="submit" value="搜索" name="sousuo">
                                <input type="button" value="导出" name="daochu" onclick="sub()">
                            </form>
                        </div>
                        <div class="table-responsive">
                            <form method="post" action="/admin/order/excel" id="form">
                            <table class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>用户名</th>
                                    <th>产品名称</th>
                                    <th>合约量</th>
                                    <th>开仓时间</th>
                                    <th>开仓价</th>
                                    <th>平仓时间</th>
                                    <th>平仓价</th>
                                    <th>手续费</th>
                                    <th>保证金</th>
                                    <th>盈亏</th>
                                    <th>过夜费/延保费</th>
                                    <th>平仓类型</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {volist name="arr" id = "vo"}
                                <tr><td style="display:none;"><input type="checkbox" checked name="id[]" value="{$vo.oid}"></td>
                                    <td>{$vo.nickname}</td>
                                    <td> {$vo.symbol_cn}</td>
                                    <td> {$vo.contract_size}</td>
                                    <td> {$vo.open_time}</td>
                                    <td> {$vo.open_price}</td>
                                    <td> {$vo.close_time}</td>
                                    <td> {$vo.close_price}</td>
                                    <td> {$vo.service_fee}</td>
                                    <td> {$vo.deposit}</td>
                                    <td> {$vo.profit}</td>
                                    <td> {$vo.overfee}</td>
                                    <td> {$vo.close_type}</td>
                                    <td>
                                        <div class="button-group">
                                            <!--                        <a class="button border-main" href="add.html"><span class="icon-edit"></span> 修改</a>-->
                                            <a class="button border-red" href="" onclick=" "><span
                                                    class="icon-trash-o"></span>平仓</a>
                                        </div>
                                    </td>
                                </tr>
                                {/volist}
                                <tr>
                                    <td colspan="15">
                                        <div class="pagelist">{$arr->render()}</div>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            </form>
                        </div>
                    </div>
                </div>
                <!-- End  Kitchen Sink -->
            </div>
        </div>

    </div>
    <!-- /. PAGE INNER  -->
</div>
<script type="application/javascript">
    function sub() {
        document.getElementById('form').submit();
    }
</script>
{include file="common/out"}